package com.benz.order.util.multithread;

public class Bank {
    private int sum;
    public void add(int num){
        synchronized (this) {
            sum += num;
            System.out.println("账号余额为：" + sum);
        }
    }
}
